import '@/assets/css/app.less';
import '@/global.less';
import { RouteRouter } from '@/routes/RouteRouter';
import { RouterBeforeEach } from '@/routes/useRouteNavigate';
import store from '@/store';
import { AliveScope } from 'react-activation';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';

/** 在程序主入口注册路由守卫钩子 */
RouterBeforeEach((to, from) => {
  console.log('路由守卫to', to);
  console.log('路由守卫from', from);
  return true;
});

ReactDOM.createRoot(document.getElementById('root')!).render(
  // <React.StrictMode>
  <Provider store={store}>
    <AliveScope>
      <RouteRouter />
    </AliveScope>
  </Provider>,
  // </React.StrictMode>,
);
